package com.ww.boot.mybatis.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 侵权风险等级
 *
 * @author panyun
 * @date 2022/2/15 17:06
 */
@Getter
@AllArgsConstructor
public enum InfringementRiskLevelEnum {

	NONE("无", 0),
	HIGH("高风险", 1);


	private final String name;
	private final int code;

	public static InfringementRiskLevelEnum retrieval(int code) {
		for (InfringementRiskLevelEnum item : values()) {
			if (item.getCode() == code) {
				return item;
			}
		}
		return null;
	}

}
